﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
using System.Resources;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace KPIS.GERP.Models.HRM
{
    [Table("mas_name_prefixes"), DataContract]
    public class MasNamePrefix
    {
        public MasNamePrefix()
        {
            RecordStatus = "U";
        }

        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [DataMember, Display(Name = "NamePrefixId", ResourceType = typeof (Resources.MasNamePrefixResource))]
        [Column("name_prefix_seq")]
        public int NamePrefixId { get; set; }

        [DataMember, Display(Name = "Code", ResourceType = typeof (Resources.MasNamePrefixResource))]
        [Column("prefix_code")]
        public string Code { get; set; }

        [DataMember, Display(Name = "Name", ResourceType = typeof (Resources.MasNamePrefixResource))]
        [Column("prefix_name")]
        public string Name { get; set; }

        [DataMember, Display(Name = "NameEng", ResourceType = typeof (Resources.MasNamePrefixResource))]
        [Column("prefix_name_eng")]
        public string NameEng { get; set; }

        [DataMember, Display(Name = "NameShort", ResourceType = typeof (Resources.MasNamePrefixResource))]
        [Column("prefix_short")]
        public string NameShort { get; set; }

        [DataMember, Display(Name = "NameShortEng", ResourceType = typeof (Resources.MasNamePrefixResource))]
        [Column("prefix_short_eng")]
        public string NameEngShort { get; set; }

        [ForeignKey("MasGender")]
        [DataMember, Display(Name = "GenderId", ResourceType = typeof (Resources.MasNamePrefixResource))]
        [Column("gender_seq")]
        public int? GenderId { get; set; }

        [EnumDataType(typeof (SYS.RecordStatus.EnumRecordStatus))]
        [DataMember, Display(Name = "RecordStatus", ResourceType = typeof (Resources.MasNamePrefixResource))]
        [Column("record_status")]
        public string RecordStatus { get; set; }

        [Column("created_by")]
        public int? CreatedBy { get; set; }

        [Column("created_when")]
        public DateTime? CreatedWhen { get; set; }

        [Column("updated_by")]
        public int? UpdatedBy { get; set; }

        [Column("updated_when")]
        public DateTime? UpdatedWhen { get; set; }

        [DataMember]
        public virtual MasGender MasGender { get; set; }
    }
}
